<!DOCTYPE html>
<html lang="en"  xmlns:th="http://www.thymeleaf.org"
      xmlns:sec="http://www.thymeleaf.org/extras/spring-security">
<head>
  <meta charset="UTF-8">
  <title th:text="${asana.title}"></title>
  <div th:replace="layouts/favicon :: favicon"></div>
  <link rel="stylesheet" th:href="@{/styles/main.css}">
</head>
<body>
<div th:replace="layouts/header :: header"></div>
<main class="container">
  <div class="showAsana">
    <div>
      <img th:src="${asana.image}" th:alt="${asana.title}"/>
      <h3 th:text="${asana.title}"></h3>
      <h5> Эффекты: <h4 th:text="${asana.positiveEffects}"></h4></h5>
      <h6> Противопоказания: <h4 th:text="${asana.negativeEffects}"></h4></h6>
<!--      <p th:text="${asana.fullInfo}"></p>-->
      <h2>Автор: <b th:text="${asana.user.username}"></b></h2>
    </div>
  </div>
  <div class="showAsana">
  <a th:href="'/asana/' + ${asana.id} + '/update'"
     sec:authorize="hasAuthority('REDACTOR') || hasAuthority('ADMIN')">Редактировать</a>

  <form class="showAsana" method="post" th:action="@{'/asana/' + ${asana.id} + '/delete'}"
     sec:authorize="hasAuthority('ADMIN')">
    <button type="submit">Удалить</button>
  </form>
  </div>
</main>

<div th:replace="layouts/footer :: footer"></div>


</body>
</html>